home *** CD-ROM | disk | FTP | other *** search
/ VRML Browsing & Building Cyberspace / VRML - Browsing and Building Cyberspace.iso / examples / sixth.wrl < prev    next >
Text File  |  1995-06-13  |  953b  |  43 lines

  1. #VRML V1.0 ascii
  2.  
  3. # Example six - a shiny Earth
  4.  
  5. # Here comes the Sun
  6. # The Separator node groups everything within it together
  7. Separator {
  8.  
  9.     # The material will effect all subsequent nodes
  10.     # The sun is yellow, isn't it?  Additive color means red + green = yellow
  11.     # We're switching to emissive color because the Sun gives off light.
  12.     Material {
  13.         emissiveColor 1 1 0        # The Sun emits lots of yellow light
  14.     }
  15.  
  16.     Sphere {
  17.         radius 10        # Big Sun
  18.     }
  19.  
  20.     # We place the Earth within it's own Separator
  21.     # To keep everything good and isolated
  22.     Separator {
  23.  
  24.         # Let's move things out of the way here
  25.         Transform {
  26.             translation 0 20 20
  27.         }
  28.  
  29.         # Color the Earth blue, and make it absorb light
  30.         # But also make it a reflective, like water
  31.         Material {
  32.             diffuseColor 0 0 1 # Big blue marble
  33.             shininess 0.9 # Water is rather shiny
  34.         }
  35.  
  36.         # Finally, create the earth
  37.         Sphere {
  38.             radius 2    # Little Earth
  39.         }
  40.     }
  41. }
  42.  
  43.